<template>
  <div class="config">

    <x-header :left-options="{showBack: true, backText: ''}" style="">设置</x-header>

    <group class="reset">
      <cell title="更改密码" is-link link="/user/config/changepassword"></cell>
    </group>

    <x-button type="primary" @click.native="quit()">退出登录</x-button>

  </div>
</template>

<script>
import { XHeader, Group, Cell, XButton } from "vux";

export default {
  name: "Config",
  methods: {
    quit() {
      window.localStorage.removeItem("user");
      this.$router.replace("/login");
    }
  },
  components: {
    XHeader,
    Group,
    Cell,
    XButton
  }
};
</script>

<style lang="less">
.config {
  .reset {
    padding: 2.875rem 0 0;
  }
  .weui-btn {
    margin-top: 10/16rem;
    width: 340/16rem !important;
    background: rgb(214, 60, 50) !important;
  }
}
</style>
